home *** CD-ROM | disk | FTP | other *** search
- Path: watnews.watson.ibm.com!ncohen
- From: ncohen@watson.ibm.com (Norman H. Cohen)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 11 Mar 1996 14:40:14 GMT
- Organization: IBM T.J. Watson Research Center
- Distribution: world
- Message-ID: <4i1e0e$1716@watnews1.watson.ibm.com>
- References: <4h5hgj$vpd@tomquartz.niestu.com> <4h7jskINNnph@anvil.ugrad.cs.ubc.ca> <313EDF38.61C1@lfwc.lockheed.com> <DnyCz1.A1n@research.att.com>
- Reply-To: ncohen@watson.ibm.com
- NNTP-Posting-Host: rios8.watson.ibm.com
-
- In article <DnyCz1.A1n@research.att.com>, ark@research.att.com
- (Andrew Koenig) says of the C standard:
-
- ...
- |> It defines what a range error is, then leaves it up to the
- |> implementation to check for it or not. Most, but not all, C implementations
- |> don't bother to check, partly because checking is expensive at run time.
-
- And partly because there is too much production C code out there that
- would fail these checks.
-
- In some cases the violation of the ANSI rules is deliberate. Either the
- programmer did not know that what he was doing violated the ANSI rules,
- or he knew but he didn't care, because it worked with the compiler he was
- using.
-
- In some cases the violation of the ANSI rules is accidental. The
- programmer does not intend to index an array out of bounds but does so by
- mistake and is not caught. Nonetheless, the program SEEMS to work, and
- the programmer would consider it a disservice if the implementation were
- "improved" to catch the error, since this would appear to break a program
- that had been working.
-
- --
- Norman H. Cohen ncohen@watson.ibm.com
-